package com.itbaizhan.shopping_manager_api.security;

import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author spf
 * @date 2023/12/17
 * @time 11:51
 */

@RestControllerAdvice
public class AccessDeniedGlobalHandler {

    @ExceptionHandler(AccessDeniedException.class)
    public void defaultException(AccessDeniedException e) throws AccessDeniedException {
        throw e;
    }

}
